<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreatePaymentTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('payment', function (Blueprint $table) {
            $table->increments('id');
            $table->integer('user_id');//用户ID
            $table->string('type',16);//账户类型
            $table->string('bank',32);//银行标识
            $table->string('card_type',32);//银行卡类型
            $table->string('name',32);//账户名称
            $table->string('number',32);//账号
            $table->boolean('available')->default(true);//是否启用
            $table->timestamps();
            $table->softDeletes();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('payment');
    }
}
